home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / BenchMarks / ByteBenchmark / pgms / fs.awk < prev    next >
Text File  |  1994-01-27  |  2KB  |  68 lines

  1. ###############################################################################
  2. #  The BYTE UNIX Benchmarks - Release 3
  3. #          Module: fs.awk   SID: 3.4 5/15/91 19:30:24
  4. #          
  5. ###############################################################################
  6. # Bug reports, patches, comments, suggestions should be sent to:
  7. #
  8. #    Ben Smith or Tom Yager at BYTE Magazine
  9. #    ben@bytepb.byte.com   tyager@bytepb.byte.com
  10. #
  11. ###############################################################################
  12. #  Modification Log:
  13. #       added geometric mean 8/6/89 -ben
  14. #       modified for new version of fstime 11/15/89 -ben
  15. #       removed variance 10/23/90 -ben
  16. #
  17. ###############################################################################
  18. BEGIN   { w_product = 0.0000;
  19.     r_product = 0.0000;
  20.     c_product = 0.0000;
  21.     iter=0;
  22.     w_too_quick=0;
  23.     r_too_quick=0;
  24.     c_too_quick=0;
  25.     }
  26. /FLAVOR\|/ { split($0, junk,"|");
  27.     flavor=junk[2] ;
  28.         }
  29. /real/    { iter++; ok++; next; }
  30. /user/    { if (flavor == "SysV") {next;} }
  31. /sys/    { if (flavor == "SysV") {next;} }
  32. /^$/    { next; } 
  33. /^#/    { next; } 
  34. /sample/ { sample = $1; next; }
  35. /fstime/ {
  36.          print "** Iteration ",iter," Failed: ",$0; 
  37.      ok--;
  38.          fail=1;
  39.          } 
  40. /write/ { if (!fail) {
  41.            w+=$1;
  42.            w2+=$1*$1;
  43.            w_product += log($1); 
  44.            }
  45.         }
  46. /read/  { if (!fail) {
  47.            r+=$1;
  48.            r2+=$1*$1;
  49.            r_product += log($1); 
  50.            }
  51.         }
  52. /copy/  { if (!fail) {
  53.            c+=$1;
  54.            c2+=$1*$1;
  55.            c_product += log($1);
  56.            }
  57.     }
  58. END {
  59.     if (ok > 0) {
  60. # TestName|Sample(seconds)|Unit(KiloBytes/sec)|ArithMean|GeoMean|DataPoints
  61.         printf "File Read  (%d seconds)|%d|KBps|%.0f|%.0f|%d\n",sample,sample,r/ok,exp(r_product/ok),ok;
  62.         printf "File Write (%d seconds)|%d|KBps|%.0f|%.0f|%d\n",sample,sample,w/ok,exp(w_product/ok),ok;
  63.         printf "File Copy  (%d seconds)|%d|KBps|%.0f|%.0f|%d\n",sample,sample,c/ok,exp(c_product/ok),ok;
  64.     } else {
  65.         print "File I/O|  no measured results|"
  66.     }
  67.     }
  68.